new Vue({
  el: '#app',
  data: {
    menuList: [],
    msg:""
  },
  methods: {
    loadMenu: function () {
      var _this = this;
      axios.get('/paradise/pages').then(function (result) {
        if (result.data.code && result.data.code == 200) {
          _this.menuList = result.data.data;
        } else {
          console.error("加载菜单失败");
        }
      });
    },
    loadMsg:function () {
      var _this = this;
      axios.get('head').then(function (result) {
        if (result.data.code && result.data.code == 200) {
          _this.msg = result.data.data;
        } else {
          console.error("head字样加载失败");
        }
      });
    },
    menuClick: function (url) {
      this.$refs.ifram.src = url+"?t="+new Date().getTime();
    }
  },
  mounted: function () {
    //解决刷新页面问题
    this.loadMenu();
    this.loadMsg();
  }
});
